package com.ktjy.task;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

@Component
public class MyQuartzJob implements Job {
    @Override
    public void execute(JobExecutionContext context) throws
            JobExecutionException {
//        // 任务执行逻辑
//        System.out.println("Quartz任务执行：" + System.currentTimeMillis());
//        // 可通过context获取任务参数
//        String param =
//                context.getJobDetail().getJobDataMap().getString("param");
//        if (param != null) {
//            System.out.println("任务参数：" + param);
//        }
    }
}